package CalendarComponents;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;

import javax.swing.Icon;

//A customized icon class that just fills it with the given color
class ColorIcon implements Icon {
	 
	int width = 0;
	int height = 0;
	Color color = null;
	
	public ColorIcon(int width, int height, Color c){
		this.width=width;
		this.height=height;
		this.color=c;
	}
	
	@Override
	public void paintIcon(Component c, Graphics g, int x, int y) {
		g.setColor(this.color);
		g.fill3DRect(x, y, getIconWidth(), getIconHeight(), true);
	}
	
	public int getIconWidth() {return this.width;}
    public int getIconHeight() {return this.height;}
};
